<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"> </meta>
    <title>Title</title>
</head>
<body>
<!--直接加入thymeleaf标签即可-->
<h1>变量输出</h1>
<h2 th:text="${name}"></h2>

</body>
</html>